﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using ElectronicJournal.DB;
using ElectronicJournal.DB.Item;

namespace ElectronicJournal.Control
{
    public partial class BlockNews : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            DbNews dbNews = new DbNews();
            List<ItemNews> itemsNews = new List<ItemNews> (dbNews.GetAll());

            rptNews.DataSource = itemsNews;
            rptNews.DataBind();
        }

    }
}